export function logout(token) {
  return new Promise((resolve, reject) => {
    if (token === 'admin-token') {
      resolve()
    }
  })
}

export function login() {
  return new Promise((resolve, reject) => {
    resolve({ data: { token: 'admin-token' }})
  })
}

export function getInfo() {
  return new Promise((resolve, reject) => {
    resolve({ data: {
      roles: ['admin'],
      introduction: 'I am a super administrator',
      avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
      name: 'Super Admin'
    }})
  })
}
